import request from '@/utils/request'

// 托盘号查询
export function billDetailRecord(query) {
  return request({
    url: '/bill/trayDetail/details',
    method: 'get',
    params: query
  })
}


// 托盘号查询
export function getSplitBill(query) {
  return request({
    url: '/bill/tray/list',
    method: 'get',
    params: query
  })
}

// 查询分拣单明细列表
export function getSplitBillDetailList(query) {
  return request({
    url: '/inOutStock/splitBillDetail/list',
    method: 'get',
    params: query
  })
}



// 物料号查询
export function getBillReceiveList(query) {
  return request({
    url: '/bill/receive/list',
    method: 'get',
    params: query
  })
}
// 查询收货任务单明细列表
export function getBillReceiveDetailList(query) {
  return request({
    url: '/bill/receiveDetail/list',
    method: 'get',
    params: query
  })
}

// 查询收货记录列表
export function getBillProductList(query) {
  return request({
    url: '/basic/erpProduct/listByStorehouseNo',
    method: 'get',
    params: query
  })
}
// 新增收货单明细
export function addReceiveDetail(data) {
  return request({
    url: '/bill/trayDetail',
    method: 'post',
    data
  })
}
// 完成收货单
export function complete(data) {
  return request({
    url: '/bill/receive/complete',
    method: 'post',
    data
  })
}

// // 根据ID删除任务明细
export function delByDetailId(id) {
  return request({
    url: '/bill/receive/' + id,
    method: 'delete',
  })
}
// //删除任务明细
export function delByReceiveDetail(data) {
  return request({
    url: '/bill/receive/deleteDetail',
    method: 'post',
	data
  })
}

// 新增条码记录
export function saveBarcode(data) {
  return request({
    url: '/storehouse/barcode',
    method: 'post',
	data
  })
}
